﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ResumenParteDiario.aspx.cs" Inherits="ResumenParteDiario" %>

<%@ Register src="MenuSuperior.ascx" tagname="MenuSuperior" tagprefix="uc1" %>
<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxUploadControl" tagprefix="dxuc" %>
<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxClasses" tagprefix="dxw" %>
<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxTabControl" tagprefix="dxtc" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dxwgv" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">

        .style3
        {
            text-align: left;
        }
    
.dxeButtonEdit
{
    background-color: white;
    border: solid 1px #9F9F9F;
    width: 170px;
}
.dxeButtonEdit .dxeEditArea {
    background-color: white;
}

.dxeEditArea 
{
	font-family: Tahoma;
	font-size: 9pt;
	border: 1px solid #A0A0A0;
}
.dxeButtonEditButton,
.dxeButtonEditButton, .dxeCalendarButton,
.dxeSpinIncButton, .dxeSpinDecButton,
.dxeSpinLargeIncButton, .dxeSpinLargeDecButton
{	
	vertical-align: middle;
	border: solid 1px #7f7f7f;
	cursor: pointer;
} 
        .style2
        {
            width: 100%;
            text-align: left;
        }
        .dxeTextBox, .dxeMemo
{
    background-color: white;
    border: solid 1px #9f9f9f;
}
.dxeTextBox .dxeEditArea
{
    background-color: white;
}

        .style5
        {
            width: 100%;
            border-width: 0px;
            margin-left: 2px;
            margin-right: 1px;
            margin-top: 0px;
            margin-bottom: 1px;
            padding-left: 0px;
            padding-right: 1px;
            padding-top: 0px;
            padding-bottom: 0px;
        }
        .style6
        {
            font-family: Tahoma;
            font-size: 11px;
            font-weight: normal;
            text-align: center;
            white-space: nowrap;
        }
        </style>
    <link href="App_Themes/Aqua/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <uc1:MenuSuperior ID="MenuSuperior1" runat="server" />
        <br />
</div>
    <div align="center">
        <table align="center" cellpadding="0" cellspacing="0">
            <tr class="tdHeaderPrincipal">
                <td colspan="5" style="text-align: center;">
                    Reporte Resúmen Partes Diarios
                </td>
            </tr>
            <tr>
                <td class="style3" nowrap="nowrap">
                    Fecha desde
                </td>
                <td style="text-align: left">
                    <dxe:ASPxDateEdit ID="ddlFechaDesde" runat="server" Date="03/17/2010 11:14:18" DisplayFormatString="dd/MM/yyyy"
                        EditFormat="Custom" EditFormatString="dd/MM/yyyy" MaxDate="2099-01-01" MinDate="1900-01-01"
                        Width="100px">
                    </dxe:ASPxDateEdit>
                </td>
                <td>
                    &nbsp; &nbsp;
                </td>
                <td >
                    Legajo desde
                </td>
                <td style="text-align: left">
                    <dxe:ASPxTextBox ID="txtLegajoDesde" runat="server" Width="80px">
                        <MaskSettings Mask="&lt;0..999999999&gt;" />
                        <MaskSettings Mask="&lt;0..999999999&gt;"></MaskSettings>
                    </dxe:ASPxTextBox>
                    <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtLegajoDesde"
                        Display="Dynamic" ErrorMessage="Debe ingresar un legajo válido." MaximumValue="99999999"
                        MinimumValue="0" Type="Integer"></asp:RangeValidator>
                </td>
            </tr>
            <tr>
                <td class="style3" nowrap="nowrap">
                    Fecha hasta
                </td>
                <td style="text-align: left">
                    <dxe:ASPxDateEdit ID="ddlFechaHasta" runat="server" Date="03/17/2010 11:14:18" DisplayFormatString="dd/MM/yyyy"
                        EditFormat="Custom" EditFormatString="dd/MM/yyyy" MaxDate="2099-01-01" MinDate="1900-01-01"
                        Width="100px">
                    </dxe:ASPxDateEdit>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="ddlFechaDesde"
                        ControlToValidate="ddlFechaHasta" Display="Dynamic" ErrorMessage="La fecha fin es menor que la fecha de inicio."
                        Operator="GreaterThanEqual" ValueToCompare="Date" Type="Date"></asp:CompareValidator>
                </td>
                <td>
                    &nbsp;
                </td>
                <td >
                    Legajo hasta
                </td>
                <td style="text-align: left">
                    <dxe:ASPxTextBox ID="txtLegajoHasta" runat="server" Width="80px">
                        <MaskSettings Mask="&lt;0..999999999&gt;" />
                        <MaskSettings Mask="&lt;0..999999999&gt;"></MaskSettings>
                    </dxe:ASPxTextBox>
                    <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtLegajoHasta"
                        Display="Dynamic" ErrorMessage="Debe ingresar un legajo válido." MaximumValue="99999999"
                        MinimumValue="0" Type="Integer"></asp:RangeValidator>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Sector
                </td>
                <td style="text-align: left">
                    <asp:DropDownList ID="ddlSector" runat="server" AppendDataBoundItems="True" DataSourceID="dsSectores"
                        DataTextField="Descripcion" DataValueField="IdSector">
                        <asp:ListItem Selected="True" Value="-1">Todos</asp:ListItem>
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="dsSectores" runat="server" SelectMethod="ObtenerTodosLosSectores"
                        TypeName="RC.ControlAcceso.ObjetosNegocio.CA2SectorColeccion"></asp:ObjectDataSource>
                </td>
                <td>
                    &nbsp;
                </td>
                <td >
                    &nbsp;
                </td>
                <td style="text-align: left">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <dxe:ASPxButton ID="btnGenerar0" runat="server" OnClick="btnGenerar_Click" Style="text-align: left"
                        Text="Generar">
                    </dxe:ASPxButton>
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="5">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="5">
                    <table align="center">
                        <tr>
                            <td>
                                <dxe:ASPxButton ID="expExcel" runat="server" OnClick="expExcel_Click" Text="Exportar Excel">
                                </dxe:ASPxButton>
                            </td>
                            <td>
                                <dxe:ASPxButton ID="expPDF" runat="server" OnClick="expPDF_Click" Text="Exportar PDF">
                                </dxe:ASPxButton>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
     <div align="center">
         <dxwgv:ASPxGridView ID="gvResumen" runat="server" 
             AutoGenerateColumns="False" DataSourceID="dsReporte">
             <TotalSummary>
                 <dxwgv:ASPxSummaryItem DisplayFormat="f" FieldName="Cantidad" 
                     ShowInColumn="Cantidad" ShowInGroupFooterColumn="Cantidad" SummaryType="Sum" />
             </TotalSummary>
             <Columns>
                 <dxwgv:GridViewDataTextColumn FieldName="Legajo" VisibleIndex="0">
                 </dxwgv:GridViewDataTextColumn>
                 <dxwgv:GridViewDataTextColumn FieldName="PersonalNombre" ReadOnly="True" 
                     VisibleIndex="1" Caption="Nombre">
                 </dxwgv:GridViewDataTextColumn>
                 <dxwgv:GridViewDataTextColumn FieldName="PersonalSector" ReadOnly="True" 
                     VisibleIndex="2" Caption="Sector">
                 </dxwgv:GridViewDataTextColumn>
                 <dxwgv:GridViewDataTextColumn FieldName="ConceptoDeHora" VisibleIndex="3" 
                     Caption="Concepto">
                 </dxwgv:GridViewDataTextColumn>
                 <dxwgv:GridViewDataTextColumn FieldName="Cantidad" VisibleIndex="4">
                 </dxwgv:GridViewDataTextColumn>
             </Columns>
             <SettingsPager AlwaysShowPager="True" Mode="ShowAllRecords">
             </SettingsPager>
             <Settings ShowFooter="True" ShowGroupPanel="True" />
             <SettingsText GroupPanel="Arrastre una columna para agrupar por esa columna" />
         </dxwgv:ASPxGridView>
         <dxwgv:ASPxGridViewExporter ID="gvExport" runat="server" FileName="ResumenPD" 
             GridViewID="gvResumen">
         </dxwgv:ASPxGridViewExporter>
        <asp:ObjectDataSource ID="dsReporte" runat="server" 
            SelectMethod="ObtenerLiquidacionDeHorasNoAutorizadas" 
            
             TypeName="RC.ControlAcceso.ObjetosNegocio.CA2Reportes+CA2ReporteLiquidacionHoras" 
             OldValuesParameterFormatString="original_{0}" onselecting="dsReporte_Selecting">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddlFechaDesde" Name="pDesde" 
                    PropertyName="Value" Type="DateTime" />
                <asp:ControlParameter ControlID="ddlFechaHasta" Name="pHasta" 
                    PropertyName="Value" Type="DateTime" />
                <asp:ControlParameter ControlID="ddlSector" DefaultValue="-1" Name="pSectorId" 
                    PropertyName="SelectedValue" Type="Int32" />
                <asp:ControlParameter ControlID="txtLegajoDesde" DefaultValue="-1" 
                    Name="pLegajoDesde" PropertyName="Text" Type="Int32" />
                <asp:ControlParameter ControlID="txtLegajoHasta" DefaultValue="-1" 
                    Name="pLegajoHasta" PropertyName="Text" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
